<div id=admin>
<h1>Accueil responsable "<?php echo $query_exposition->first_row()->title?>"</h1>
<script type="text/javascript">
function afficher(id){
	window.open('<?php echo site_url()."/pieces/qr/"?>'+id, 'popup', "height=540,width=640,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'");
}
</script>

<h2><a href="<?php echo site_url()?>/expositions/edit/">Editer les paramètres généraux de mon exposition</a></h2>
<h3><a href="<?php echo site_url()?>/visit/view/<?php echo $query_pieces->first_row()->id?>">Voir mon exposition</a></h3>
<div id=oeuvres>
<h3>Liste des oeuvres</h3><form>
<input type="button" name="add_piece" value="Ajouter une oeuvre" onclick="window.location.href='<?php echo site_url(); ?>/pieces/edit'"/> 
</form>

<ul>
<?php foreach ($query_pieces->result() as $row) {
?>
<li><?php echo $row->name?> <a href="<?php echo site_url()?>/pieces/delete/<?php echo $row->id?>">supprimer</a> <a href="<?php echo site_url()?>/pieces/edit/<?php echo $row->id?>"> éditer</a><br/>
<a href="javascript:void" onclick="afficher(<?php echo $row->id?>);">QR Code</a></li>
<?php }
?>
</ul>
</div>

<div id=salles>
<h3>Liste des salles </h3> <form>
<input type="button" name="add_room" value="Gérer les salles" onclick="window.location.href='<?php echo site_url()?>/rooms/view/<?php echo$query_exposition->row()->id?>'"/> 
</form>
<ul>
<?php foreach ($query_rooms->result() as $row) {
?>
<li><?php echo $row->name?> <a href="<?php echo site_url()?>/rooms/delete/<?php echo $row->id?>">supprimer</a> <a href="<?php echo site_url()?>/rooms/edit/<?php echo $row->id?>">éditer</a></li>
<?php }
?>
</ul>

</div>
</div>